package com.cgsd.heyu.presenter.news;

import com.android.library.utils.BeanUtils;
import com.hztz.kankanzhuan.event.TaskStatusEvent;

/**
 * @author xiaoxing
 * 用户相关
 */
public class NewsPresenter implements NewsContract.Presenter {

    private NewsContract.NewsView mNewsView;

    public NewsPresenter(NewsContract.NewsView view) {
        mNewsView = BeanUtils.checkNotNull(view);
        mNewsView.setPresenter(this);
    }

    @Override
    public void newsStatusChanged(TaskStatusEvent taskStatusEvent) {
        if (taskStatusEvent==null) {
            mNewsView.newsDoneFailed();
            return;
        }

        mNewsView.newsDoneSuccess(taskStatusEvent.taskId,taskStatusEvent.orderId);
    }

    @Override
    public void start() {

    }

}
